package top.kaoshanji.p1ch06b;

import java.util.Arrays;
import java.util.Random;

/**
 * 代码清单-p1ch06b-129页b：使用new创建数组
 * author kaoshanji
 * ^_^
 * create time 2025/3/8 18:25
 */
public class ArrayNew {

    public static void main(String[] args) {
        int[] a;
        Random rand = new Random(47);
        a = new int[rand.nextInt(20)];

        System.out.println("length of a = " + a.length);
        System.out.println(Arrays.toString(a));

    }



}
